/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.acme.model;

import java.io.Serializable;
import javax.persistence.Column;

/**
 *
 * @author General
 */
public class StockPricePK implements Serializable {
    @Column
    private long stock_id;
    @Column
    private long market_id;
    @Column
    private String priceDate;

    public StockPricePK() {
    }

    public StockPricePK(long stock_id, long market_id, String priceDate) {
        this.stock_id = stock_id;
        this.market_id = market_id;
        this.priceDate = priceDate;
    }

    public long getStock_id() {
        return stock_id;
    }

    public void setStock_id(long stock_id) {
        this.stock_id = stock_id;
    }

    public long getMarket_id() {
        return market_id;
    }

    public void setMarket_id(long market_id) {
        this.market_id = market_id;
    }

    public String getPriceDate() {
        return priceDate;
    }

    public void setPriceDate(String priceDate) {
        this.priceDate = priceDate;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 79 * hash + (int) (this.stock_id ^ (this.stock_id >>> 32));
        hash = 79 * hash + (int) (this.market_id ^ (this.market_id >>> 32));
        hash = 79 * hash + (this.priceDate != null ? this.priceDate.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final StockPricePK other = (StockPricePK) obj;
        if (this.stock_id != other.stock_id) {
            return false;
        }
        if (this.market_id != other.market_id) {
            return false;
        }
        if ((this.priceDate == null) ? (other.priceDate != null) : !this.priceDate.equals(other.priceDate)) {
            return false;
        }
        return true;
    }
    
}
